﻿using Orchard.Commerce.Models;
using Orchard.Data;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;


namespace Orchard.Commerce.Handlers
{
    public class CategoryHandler : ContentHandler
    {
        public readonly static ContentType ContentType = new ContentType
        {
            Name = "Category",
            DisplayName = "Category"
        };

        public CategoryHandler(IRepository<CategoryRecord> repository)
        {
            Filters.Add(new ActivatingFilter<Category>(CategoryHandler.ContentType.Name));
            Filters.Add(StorageFilter.For(repository));
        }
    }

}